import random
from multiprocessing import Pool
from feapder.db.mysqldb import MysqlDB

from utils.db.mongo_pool import MongoPool


def f(x):
    return x*x


if __name__ == '__main__':
    # with Pool(5) as p:
    #     print(p.map(f, [2]*9))

    # db = MysqlDB()
    # sql = """select ip from ippool"""
    # ips = db.find(sql)
    # print(ips)
    db = MysqlDB()
    sql = """select detail_job from job_detail"""
    jobs = db.find(sql)
    for job in jobs[260:271]:
        job = job[0]
        print(job)